package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

public class InsuranceRecordDeleteRequest extends Request {


	/**
	 * 
	 */
	private static final long serialVersionUID = 7991397458421166232L;

	/**
	 * 账号ID
	 */
	private int userId;

	/**
	 * 保险信息id
	 */
	private int recordId;
	
	public InsuranceRecordDeleteRequest() {
		
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		this.userId = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), 0);
		this.recordId = requestInfo.getIntParameter(ApiUrlParamEnum.id.getParamName(), 0);
		
		if (recordId < 1) {
			throw new RequestIllegalException("error recordId:" + recordId);
		}
		
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getRecordId() {
		return recordId;
	}

	public void setRecordId(int recordId) {
		this.recordId = recordId;
	}

	
}
